package zju.lzy.dto;


import lombok.Data;

@Data
public class ResponseMessage {
    boolean success;
    String info;
    Object data;


    public ResponseMessage(boolean success, String info, Object data) {
        this.success = success;
        this.info = info;
        this.data = data;
    }

    public static ResponseMessage emptyInstance() {
        return new ResponseMessage(false, "empty", null);
    }

    public static ResponseMessage success(String info, Object data) {
        return new ResponseMessage(true, info, data);
    }

    public static ResponseMessage fail(String info, Object data) {
        return new ResponseMessage(false, info, data);
    }


}
